﻿<?php
ignore_user_abort(TRUE);
require_once("./interface.php");
require_once("./utils.php");
require_once("./interface.php");
require_once("./TechnicFunc.php");
require_once("./SoldierFunc.php");
require_once("./HotelFunc.php");
require_once("./OfficeFunc.php");
require_once("./MarketFunc.php");
require_once("./UnionFunc.php");
require_once("./StoreFunc.php");
require_once("./TroopFunc.php");
require_once("./global.php");
require_once("./report.php");

//mysql_connect()函数
$con = mysql_connect("127.0.0.1","root","111111");
if (!$con)
  {
  die('Could not connect: ' . mysql_error());
  }

mysql_select_db("sanguo1", $con);//链接数据库
$heros=sql_fetch_into_arrays("select * from rank_hero order by wisdom desc ");//将领表
$i=0;
$k=1;
while($i<=1000)
  {
$h_hid_w=$heros['hid'][$i];
$h_name_w=$heros['name'][$i];
$h_user_w=$heros['user'][$i];
$h_level_w=$heros['level'][$i];
$h_affairs_w=$heros['affairs'][$i];
$h_ubravery_w=$heros['bravery'][$i];
$h_wisdom_w=$heros['wisdom'][$i];
mysql_query("INSERT INTO rank_hero_wisdom (rank,hid,name,user,level,affairs,bravery,wisdom) 
VALUES ('$k', '$h_hid_w', '$h_name_w','$h_user_w','$h_level_w','$h_affairs_w','$h_ubravery_w','$h_wisdom_w')");

  $i=$i+1;
  $k=$k+1;
  }
  
 mysql_close($con);
?>



